﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Zj.SchoolManage.Domain.Core
{
    /// <summary>
    /// 课程
    /// </summary>
    public class Course
    {
        public Course()
        {
            this.Enrollments = new HashSet<Enrollment>();
        }
        [Key]
        public int Id { get; set; }

        public string Title { get; set; }

        public int Credits { get; set; }

        public int  TeacherId { get; set; }

        [ForeignKey("TeacherId")]
        public virtual Teacher  Teacher { get; set; }

        public virtual ICollection<Enrollment> Enrollments { get; set; }

    }
}
